package com.sls.game.dao.nutsnet.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sls.game.dao.impl.SuperDAO;
import com.sls.game.dao.nutsnet.NutsNetGoodsAreaDAO;
import com.sls.game.pojo.nutsnet.NutsNetGoodsAreaInfo;

/**
 * 
 * @description 坚果网络商品支持区域DAO
 * @author Wangxuegang
 * @date 2012-11-1
 * 
 */
@Repository("nutsNetGoodsAreaDAO")
public class NutsNetGoodsAreaDAOImpl extends SuperDAO<NutsNetGoodsAreaInfo>
		implements NutsNetGoodsAreaDAO {

	/**
	 * 记录插入
	 * 
	 * @param nutsNetGoodsAreaInfo
	 */
	@Override
	public void insert(NutsNetGoodsAreaInfo nutsNetGoodsAreaInfo) {
		this.getSqlSession().insert("mybatis.xml.nutsNetGameAreaMapper.insert",
				nutsNetGoodsAreaInfo);

	}

	/**
	 * 记录查询
	 * 
	 * @param nutsNetGoodsAreaInfo
	 * @return
	 */
	@Override
	public List<NutsNetGoodsAreaInfo> queryGameArea(
			NutsNetGoodsAreaInfo nutsNetGoodsAreaInfo) {
		List<NutsNetGoodsAreaInfo> list = null;
		list = this.getSqlSession().selectList(
				"mybatis.xml.nutsNetGameAreaMapper.queryGameArea",
				nutsNetGoodsAreaInfo);
		return list;
	}

	@Override
	public List<NutsNetGoodsAreaInfo> queryOneOrMoreGameArea(
			NutsNetGoodsAreaInfo nutsNetGoodsAreaInfo) {
		List<NutsNetGoodsAreaInfo> list = this.getSqlSession().selectList(
				"mybatis.xml.nutsNetGameAreaMapper.queryOneOrMoreRecord",
				nutsNetGoodsAreaInfo);
		return list;
	}

	/**
	 * 删除记录
	 * 
	 * @param id
	 */
	@Override
	public void deleteById(String id) {
		this.getSqlSession().delete(
				"mybatis.xml.nutsNetGameAreaMapper.deleteById", id);
	}

}
